#include<stdio.h>
#include<string.h>

int isleft(char arr1[],char arr2[])
{
	int len1=strlen(arr1);
	int len2=strlen(arr2);
	if(len1!=len2)
		return 0;
	strncat(arr1,arr1,len1);
	if(strstr(arr1,arr2))
		return 1;
	else
		return 0;
}

int main()
{
	char arr1[20]="abcdef";
	char arr2[]="cdefa";
	if(isleft(arr1,arr2))
		printf("ok\n");
	else
		printf("no\n");
	return 0;
}
